﻿<%@ Page Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeBehind="UserList.aspx.cs"
    Inherits="WebAppAuthAdmin.App.UserList" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">

</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <h2>
    <asp:Image Width="15px" Height="15px" ID="Image2" CssClass="imgExpand"
            ImageUrl="/Images/icon_blockexpanded.png" runat="server" ClientIDMode="Static"
            alt="" onclick="window.AppCommonObj.toggleVisibility(this.id, 'searchDiv');" />
        Usuarios
    </h2>
    <div id="searchDiv" class="editionContainerFilter">       
        <p >
            <span class="title2">Aplicaci&oacute;n:</span>            
            <asp:Label ID="lblApplication" runat="server" Text="Label"></asp:Label>
            <%--<asp:TextBox ID="txtApplication" runat="server" ReadOnly="true" CssClass="readonly inputs inputlong" ClientIDMode="Static"></asp:TextBox>--%>
        </p>
        <div class="clear">
        </div>
        <p>
            <span class="title2">Nombre:</span>          
            <asp:TextBox ID="txtNombre" runat="server" CssClass="inputlong"></asp:TextBox>
        </p>
          <div class="clear">
        </div>
        <p>
            <span class="title2">Incluir Usuarios:</span>                      
            <asp:DropDownList ID="cboUsuariosBloqueados" runat="server">
            </asp:DropDownList>
        </p>
        <asp:Panel ID="pnlUsuarioRegistrados" runat="server">        
         <p>
            <span class="title2 secondColumn">Incluir solo registrados:</span>                      
           <asp:CheckBox ID="chkCondierarRegistrados" runat="server" Checked="true" />
        </p>
            
        </asp:Panel>
          <div class="clear">
        </div>
        <asp:LinkButton ID="lnkBuscar" runat="server" OnClick="lnkBuscar_Click" ClientIDMode="Static">Buscar</asp:LinkButton>
        <div class="clear">
        </div>
    </div>
     <h2>
        <asp:Image Width="15px" Height="15px" ID="Image1" CssClass="imgExpand"
            ImageUrl="/Images/icon_blockexpanded.png" runat="server" ClientIDMode="Static"
            alt="" onclick="window.AppCommonObj.toggleVisibility(this.id, 'pnlResults');" />
       Resultados
    </h2>         
     <asp:LinkButton ID="lnkCrearUsuario" runat="server" OnClick="lnkCrearUsuario_Click" CssClass="guardar">Crear Usuario</asp:LinkButton>
     <br />
    <asp:Panel ID="pnlResults" CssClass="editionContainerForGrid" runat="server" Visible="false" ClientIDMode="Static">
        <asp:GridView ID="GridUsers" runat="server" CellPadding="4" ForeColor="#333333" GridLines="None"
            AutoGenerateColumns="False" DataKeyNames="UserName" OnRowCommand="GridUsers_RowCommand"
            Width="100%">
            <AlternatingRowStyle BackColor="White" />
            <Columns>
                <asp:ButtonField ButtonType="Image" CommandName="editar" ImageUrl="~/Images/editar.png" 
                    Text="Button" AccessibleHeaderText="editar">
                    <HeaderStyle HorizontalAlign="Left" Width="30px" />
                    <ItemStyle HorizontalAlign="Center" />
                </asp:ButtonField>
                <asp:BoundField DataField="UserName" HeaderText="Usuario">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                 <asp:BoundField DataField="GivenName" HeaderText="Nombre">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>                
                <asp:CheckBoxField DataField="UsuarioEnAplicacion" HeaderText="En Aplicacion?">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:CheckBoxField>                                
                <asp:CheckBoxField DataField="Blocked" HeaderText="Bloqueado">
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:CheckBoxField>                                
            </Columns>
            <EditRowStyle BackColor="#2461BF" />
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#4b6c9e" Font-Bold="True" ForeColor="White" HorizontalAlign="Left" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#EFF3FB" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F5F7FB" />
            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
            <SortedDescendingCellStyle BackColor="#E9EBEF" />
            <SortedDescendingHeaderStyle BackColor="#4870BE" />
        </asp:GridView>
    </asp:Panel>

     <script type='text/javascript'>

         $(document).ready(function () {

             if (!window.AppCommonObj) {
                 window.AppCommonObj = new AppCommon();
             }

             window.AppCommonObj.initializeEnterKeyEvent($('#searchDiv'), function () {
                 if ($('#lnkBuscar').click()) {
                     __doPostBack($('#lnkBuscar').attr('aspnetid'), '');
                  };
             });

         });
    </script>
        

</asp:Content>
